import ElementUi from 'element-plus'
import 'element-plus/dist/index.css'
import '@/assets/css/element-theme.scss'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import AsyncButton from '@/components/AsyncButton/index.vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

export default function setupUi(app){
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
        app.component(key, component)
    }
    app.use(ElementUi, {
        locale: zhCn,
    })
    app.component('AsyncButton', AsyncButton)
}